<?php
namespace app\shop\validate\company;
use think\Validate;
class Examine extends Validate
{
    protected $rule = [
        'id' => 'require',
        'user_id' => 'require',
        'title' => 'require',
        'content' => 'require',
        'examine_date' => 'require|array'
    ];
    protected $message = [
        'id.require' => '参数错误',
        'user_id.require' => '请选择员工',
        'title.require' => '请输入标题',
        'content.require' => '请输入内容',
        'examine_date.require' => '请选择考核周期',
        'examine_date.array' => '请选择考核周期',
    ];
    protected $scene = [
        'staffAdd' => ['user_id', 'title', 'content', 'examine_date'],
        'staffEdit' => ['id', 'user_id', 'title', 'content', 'examine_date'],
        'info' => ['id'],
        'add' => ['content', 'title'],
        'edit' => ['id', 'content', 'title'],
    ];
}